<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <h1>学校名称：{{name}}</h1>
        <h1>学校地址：{{address}}</h1>
    </div>
    <script>
        /*
            data中所有属性都会被vue实例数据代理
            vm.name代理了data.name
            vm.address代理了data.address
        */
        Vue.config.productionTip = false

        let data = { 
                name: "sgg",
                address: "bj"
            }
        let vm = new Vue({
            el: "#root", 
            data: data
        })
        console.log(vm)
        //创建Vue实例时传入的data会存入vm._data
        console.log(vm._data === data) //true
    </script>
</body>
</html>